Oracle 19c 安装scott用户以及数据库
登录sys超级用户,查看PDB容器名
show pdbs
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
3 ORCLPDB READ WRITE NO
比如显示ORCLPDB
使用sys用户登录到PDB
conn sys/密码@localhost:1521/ORCLPDB as sysdba;
创建scott用户
GRANT CONNECT,RESOURCE,UNLIMITED TABLESPACE TO SCOTT IDENTIFIED BY TIGER;
ALTER USER SCOTT DEFAULT TABLESPACE USERS;
ALTER USER SCOTT TEMPORARY TABLESPACE TEMP;
解锁scott用户:
alter user scott account unlock;
登录scott用户
conn scott /tiger@localhost:1521/ORCLPDB;
导入scott用户的表,找到WINDOWS.X64_193000_db_home\rdbms\admin\scott.sql文件里面的建表和数据SQL语句
验证数据
select * from emp;
PL/SQL Developer登录scott用户
用户名:scott
密码:tiger
数据库:localhost:1521/ORCLPDB
连接为:Normal